Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Hotfix - #37 - catch also php 7 throwables #49

Conversation

Ocramius
Copy link
Member

@Ocramius Ocramius commented Mar 7, 2016

Provides tests for #37

@nesl247
Copy link

nesl247 commented Mar 15, 2016

Would this not fail on PHP 5.6 because the class Throwable doesn't exist?

@msheakoski
Copy link

@nesl247 PHP < 7 doesn't appear to complain when Throwable is inside of a catch block. See example: http://sandbox.onlinephpfunctions.com/code/66997de5290d58dca15462e867224c9da62e3e14

@nesl247
Copy link

nesl247 commented Mar 15, 2016

Very interesting. I really hope this gets merged in soon then.

@Ocramius
Copy link
Member Author

@nesl247 type-hints are not causing any autoloading, so it would just be ignored ;-)

@Ocramius Ocramius added the bug label Mar 15, 2016
@Ocramius Ocramius added this to the 1.1.2 milestone Mar 15, 2016
@weierophinney weierophinney self-assigned this Mar 17, 2016
@weierophinney weierophinney modified the milestones: 1.1.3, 1.1.2 Mar 17, 2016
@@ -199,4 +209,47 @@ public function testShouldAllowDispatchingPsr7Instances()
$result = $dispatch($route, $err, $request->reveal(), $response->reveal(), $next);
$this->assertSame($response->reveal(), $result);
}

/**
* @requires PHP 7.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's nifty; didn't know about that annotation!

@weierophinney weierophinney modified the milestones: 1.2.0, 1.1.3 Mar 17, 2016
@weierophinney weierophinney merged commit 9f06282 into zendframework:develop Mar 17, 2016
weierophinney added a commit that referenced this pull request Mar 17, 2016
…wables

Hotfix - #37 - catch also php 7 throwables
weierophinney added a commit that referenced this pull request Mar 17, 2016
@Ocramius Ocramius deleted the hotfix/#37-catch-also-php-7-throwables branch May 26, 2016 00:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants